<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::post('upimg', 'CommonController@upload');
Route::get('img/{dir}-{id}/{width?}-{height?}-{upsize?}', 'CommonController@img');
Route::any('laravel-u-editor-server/server', 'caonimaController@server');

Route::post('/uploadwork', 'Site\IndexController@uploadwork');

Route::controllers([
    'auth' => 'Auth\AuthController',
    'password' => 'Auth\PasswordController',
]);


//后台路由组
Route::controllers(['admin/auth' => 'Admin\AuthController']);
Route::group(['middleware' => ['adminAuth'],'prefix'=>'admin','namespace'=>'Admin'],function(){
   Route::controllers([
       'sys'   => 'SysController',
       'item'  => 'ItemController',
       'photograph' => 'PhotographController',
       'contest' => 'ContestController',
       '/'      => 'AdminController'
   ]);
    //Route::get('item','ItemController@index');
});


Route::group(['namespace'=>'Site'],function(){
    Route::controllers([
        "contest"=>"ContestController",
        '/'      => 'IndexController',
    ]);
    Route::get('contest','ContestController@cindex');
});